﻿using GalleryLogic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


public partial class Registration : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        UnobtrusiveValidationMode = UnobtrusiveValidationMode.None;
    }

    protected void ButtonReg_Click(object sender, EventArgs e)
    {
        string email = TextBoxEmail.Text;
        string userName = TextBoxUserName.Text;
        string password = TextBoxPassword.Text;
    
        bool success = UserLogic.AddNewUser(email, userName, password);
        if (success)
        {
            Response.Write("A regisztráció sikerült!");
        }
        else
        {
            Response.Write("A regisztráció nem sikerült!");
        }
    }

    protected void ButtonBack_Click(object sender, EventArgs e)
    {
        Response.Redirect("Login.aspx");
    }

}